home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / comm / comstack.sit / Commstack_2.6.bin / Commstack 2.6 / card_3234.txt < prev    next >
Encoding:
Text File  |  1989-12-21  |  15.0 KB  |  585 lines

  1. -- card: 3234 from stack: in.6
  2. -- bmap block id: 15614
  3. -- flags: 0000
  4. -- background id: 2598
  5. -- name: Card0
  6. ----- HyperTalk script -----
  7. on opencard
  8.   global Language
  9.   openstack
  10.   -- hide card field 1
  11.   set textArrows to true
  12.   set blindtyping to false
  13.   hide message
  14.   hide card field "Anna PWD"
  15.   hide card field "PWD"
  16.   if "engl" is not in name of card button id 42 then
  17.     put "english" into Language
  18.   else
  19.     put "finnish" into Language
  20.   end if
  21. end opencard
  22.  
  23.  
  24.  
  25.  
  26.  
  27. -- part 13 (field)
  28. -- low flags: 00
  29. -- high flags: 0007
  30. -- rect: left=221 top=173 right=342 bottom=512
  31. -- title width / last selected line: 0
  32. -- icon id / first selected line: 0 / 0
  33. -- text alignment: 0
  34. -- font id: 4
  35. -- text size: 9
  36. -- style flags: 0
  37. -- line height: 12
  38. -- part name: Field 1
  39.  
  40.  
  41. -- part 8 (button)
  42. -- low flags: 00
  43. -- high flags: A000
  44. -- rect: left=10 top=36 right=81 bottom=88
  45. -- title width / last selected line: 0
  46. -- icon id / first selected line: 1006 / 1006
  47. -- text alignment: 1
  48. -- font id: 0
  49. -- text size: 12
  50. -- style flags: 0
  51. -- line height: 16
  52. -- part name: Open Connection
  53. ----- HyperTalk script -----
  54. on mouseUp
  55.   global CommSpeed,CommPrompt, NodeName, NodeType, Username
  56.   global StringGot
  57.   global XonXoff,Language
  58.   put empty into card field "connection"
  59.   openascii
  60.   get card field "UserName" of card "config"
  61.   if it is empty then
  62.     go card "config"
  63.   else
  64.     set cursor to busy
  65.     put space into card field 1
  66.     put space into card field "UserMessage"
  67.     -- hide card field 1
  68.     writeascii return
  69.     wait 1 sec
  70.     writeascii return
  71.     wait 20
  72.     writeascii return
  73.     -- push return and wait who will answear
  74.     wait 3 sec
  75.     put false into sfound
  76.     put "unknown" into CState
  77.     put 0 into counter
  78.     put Username into card field "Connection"
  79.     put " " & CommSpeed after card field "Connection"
  80.     put false into XonXoff
  81.     if NodeType is "unix" then
  82.       put "Login:" into prompt
  83.     else
  84.       put "Username:" into prompt
  85.     end if
  86.  
  87.     repeat until sfound
  88.       put counter+1 into counter
  89.       if counter>20 then exit repeat
  90.  
  91.       displayscreen "dis",prompt
  92.  
  93.       if offset("Login incorrect",card field 1) <> 0 then
  94.         put "Passerr" into CState  -- we are asked username
  95.         writeascii it & return
  96.         put "Kirjoitit salasanasi v├ñ├ñrin." into card field "UserMessage"
  97.         put empty into card field 1
  98.       end if
  99.  
  100.       if offset("Enter terminal type:",card field 1) > 0 then
  101.         writeascii "dumb" & return
  102.       end if
  103.  
  104.       if offset("L[HIVERKKO",card field 1) <> 0 then
  105.         put "Bridge" into CState  -- we are in Bridge LAN
  106.         get card field "Node Name" of card "config"
  107.         put " " & it after card field "Connection"
  108.         writeascii "c " & it & return
  109.         wait 100
  110.         writeascii return
  111.         put "Mikrosi on kytketty Bridge l├ñhiverkkoon." into card field "UserMessage"
  112.         put space into card field 1
  113.       end if
  114.  
  115.       if offset("Password expir",card field 1) <> 0 then
  116.         put "PWE" into CState
  117.         answer "Salasanasi vanhenee. Sinun pit├ñ├ñ vaihtaa uusi."
  118.         put "Salasanasi on vanha. Vaihda uusi Painikkeella SALASANA." into card field "UserMessage"
  119.         put space into card field 1
  120.       end if
  121.  
  122.       if offset("VIRHEELLINEN VALINTA",card field 1) <> 0 or offset("TERVETULOA", card field 1) > 0 then
  123.         put "DCA" into CState  -- we are in DCA PhoneCable Net
  124.         get first character of card field "DCA Name" of card "config"
  125.         writeascii it & return
  126.         put "Mikrosi on kytketty DCA-verkkoon." into card field "UserMessage"
  127.         put space into card field 1
  128.       end if
  129.  
  130.       if offset("Username:",card field 1) <> 0 then
  131.         put true into XonXoff
  132.         put "Login" into CState  -- we are asked username
  133.         get card field "UserName" of card "config"
  134.         writeascii it & return
  135.         if Language is "english" then
  136.           put "Starting at account " & it into card field "UserMessage"
  137.         else
  138.           put "Menen k├ñytt├ñj├ñtunnukselle " & it into card field "UserMessage"
  139.         end if
  140.         put space into card field 1
  141.         put "Password:" into prompt
  142.       end if
  143.  
  144.       if offset(return & "Login:",card field 1) <> 0 then
  145.         put "Login" into CState  -- we are asked username
  146.         get card field "UserName" of card "config"
  147.         put it into username
  148.         writeascii it & return
  149.         if Language is "english" then
  150.           put "Starting at account " & it into card field "UserMessage"
  151.         else
  152.           put "Menen k├ñytt├ñj├ñtunnukselle " & it into card field "UserMessage"
  153.         end if
  154.         put space into card field 1
  155.         put "Password:" into prompt
  156.       end if
  157.  
  158.       if offset("Password:",card field 1) <> 0 then
  159.         put "Password" into CState  -- we are asked passwd
  160.         --ask "Anna tunnuksen" && username && "salasana."
  161.         show card field "Anna PWD"
  162.         show card field "PWD"
  163.         put empty into card field "PWD"
  164.         put empty into XPWD
  165.         repeat with i=1 to 5000
  166.           put inkey() into x
  167.           if x is not empty then
  168.             if x is return then
  169.               exit repeat
  170.             end if
  171.             put x after XPWD
  172.             put "ΓÇó" after card field "PWD"
  173.           end if
  174.         end repeat
  175.         hide card field "Anna PWD"
  176.         hide card field "PWD"
  177.         get XPWD
  178.         set cursor to busy
  179.         if it is empty then exit mouseup
  180.         writeascii it & return
  181.         put empty into card field 1
  182.         put empty into it
  183.         put return & "$ " into dollar
  184.         put CommPrompt into prompt
  185.  
  186.       end if
  187.  
  188.       if offset("]c",card field 1) > 0 or offset("]0c",card field 1) > 0 or offset("Z",card field 1) > 0 then
  189.         put "TType" into CState
  190.         writeascii return
  191.         -- put "VT100" into card field 1
  192.       end if
  193.  
  194.       -- put " " & it after card field "Connection"
  195.       if NodeType is "vms" then
  196.         put return & "$ " into dollar
  197.         if offset(dollar,card field 1) <> 0 then
  198.           writeascii "set term/page=0" & return
  199.           writeascii "set term/noecho" & return
  200.           writeascii "set term/unknown" & return
  201.           writeascii "set prompt=" & quote & "$ " & quote & return
  202.           put "In" into CState
  203.           put true into sfound
  204.           put empty into card field 1
  205.         end if
  206.       else
  207.         if offset("%",card field 1) <> 0 then
  208.           writeascii "stty rows 19" & return
  209.           wait 100
  210.           writeascii "set term=dumb" & return
  211.           wait 100
  212.           -- writeascii "setenv EDITOR" && -- quote & "cat >\!" & quote & return -- ei toimi
  213.           -- writeascii "set prompt=" & quote & "%m:%d%" & quote & return
  214.           put "In" into CState
  215.           put true into sfound
  216.           put empty into card field 1
  217.         end if
  218.       end if
  219.  
  220.       wait 200
  221.  
  222.       if "you have mail" is in card field 1 then
  223.         put "Sinulle on postia." after card field "UserMEssage"
  224.       end if
  225.  
  226.     end repeat
  227.  
  228.     if Cstate = "in" then
  229.       get first word of card field "Node Name" of card "config"
  230.       put it into computer
  231.       put "Olet nyt k├ñytt├ñm├ñss├ñ konetta " & computer & " ja voit l├ñhett├ñ├ñ ja vastaanottaa kirjeit├ñ." into card field "UserMessage"
  232.       --show button id 29
  233.       --show button id 28
  234.       --show button id 31
  235.     else
  236.       if Language is "English" then
  237.         put "Connection failed." && "Speed/line/stack problem." && "Stack is using speed " && CommSPeed && "baud." into card field "UserMEssage"
  238.       else
  239.         put "Yhteydenotto ep├ñonnistui." && "Voi olla ett├ñ yhteydess├ñ tai" && "kohdekoneessa on jokin vika. Pinon k├ñytt├ñm├ñ linjanopeus on" && CommSPeed && "baudia." into card field "UserMEssage"
  240.       end if
  241.     end if
  242.  
  243.     closeascii
  244.   end if
  245.   put true into XonXoff
  246.   talk "Olen valmis.",120,120
  247.   visual effect dissolve
  248.   go card "card1"
  249. end mouseup
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256. -- part 42 (button)
  257. -- low flags: 00
  258. -- high flags: A000
  259. -- rect: left=7 top=142 right=190 bottom=146
  260. -- title width / last selected line: 0
  261. -- icon id / first selected line: 31880 / 31880
  262. -- text alignment: 1
  263. -- font id: 0
  264. -- text size: 12
  265. -- style flags: 0
  266. -- line height: 16
  267. -- part name: Kèènnè buttonit suomeksi
  268. ----- HyperTalk script -----
  269. on mouseUp
  270.   global STOPIT
  271.   if "engl" is in name of me then
  272.     put 1 into i1
  273.     put 2 into i2
  274.   else
  275.     put 2 into i1
  276.     put 1 into i2
  277.   end if
  278.   BGButtons i1,i2
  279.   CardButtons i1,i2
  280.   go card "card0"
  281. end mouseUp
  282.  
  283. on BGButtons i1,i2
  284.   global STOPIT
  285.   put number of backgrounds into NC
  286.   repeat with c = 1 to NC
  287.     if number of this background is not c then
  288.       go background c
  289.     end if
  290.     put number of background buttons into NB
  291.     --put NB && NC
  292.     put number of lines of card field "translate" of card "translate" into NL
  293.     repeat with B = 1 to NB
  294.       put "Card " & C & " button " & B
  295.       put short name of background button B into Bname
  296.       put false into OK
  297.       repeat with L=1 to NL
  298.         if Bname is item i1 of line L of card field "translate" of card "translate" then
  299.           put true into OK
  300.           exit repeat
  301.         end if
  302.       end repeat
  303.       if OK then
  304.         get item i2 of line L of card field "translate" of card "translate"
  305.         set name of background button B to it
  306.         --put "set name of " && B && "to" && it
  307.       else
  308.         ask Bname & " = ?"
  309.         if it is empty then
  310.           answer "Interrupted"
  311.           exit BGButtons
  312.         end if
  313.         if it is not empty then
  314.           set name of background button B to it
  315.         end if
  316.         put Bname & "," & it & return after card field "translate" of card "translate"
  317.       end if
  318.     end repeat
  319.     go card c
  320.   end repeat
  321. end BGButtons
  322.  
  323. on CardButtons i1,i2
  324.   global STOPIT
  325.   put number of cards into NC
  326.   repeat with c = 1 to NC
  327.     if number of this card is not c then
  328.       go card c
  329.     end if
  330.     put number of card buttons into NB
  331.     --put NB && NC
  332.     put number of lines of card field "translate" of card "translate" into NL
  333.     repeat with B = 1 to NB
  334.       put "Card " & C & " button " & B
  335.       put short name of card button B into Bname
  336.       put false into OK
  337.       repeat with L=1 to NL
  338.         if Bname is item i1 of line L of card field "translate" of card "translate" then
  339.           put true into OK
  340.           exit repeat
  341.         end if
  342.       end repeat
  343.       if OK then
  344.         get item i2 of line L of card field "translate" of card "translate"
  345.         set name of card button B to it
  346.         --put "set name of " && B && "to" && it
  347.       else
  348.         ask Bname & " = ?"
  349.         if it is empty then
  350.           answer "Interrupted"
  351.           exit CardButtons
  352.         end if
  353.         if it is not empty then
  354.           set name of card button B to it
  355.         end if
  356.         put Bname & "," & it & return after card field "translate" of card "translate"
  357.       end if
  358.     end repeat
  359.     go card c
  360.   end repeat
  361. end CardButtons
  362.  
  363.  
  364.  
  365.  
  366. -- part 22 (field)
  367. -- low flags: 01
  368. -- high flags: 2002
  369. -- rect: left=221 top=120 right=173 bottom=512
  370. -- title width / last selected line: 0
  371. -- icon id / first selected line: 0 / 0
  372. -- text alignment: 0
  373. -- font id: 0
  374. -- text size: 12
  375. -- style flags: 0
  376. -- line height: 16
  377. -- part name: UserMessage
  378.  
  379.  
  380. -- part 15 (button)
  381. -- low flags: 00
  382. -- high flags: A000
  383. -- rect: left=223 top=59 right=111 bottom=336
  384. -- title width / last selected line: 0
  385. -- icon id / first selected line: 27056 / 27056
  386. -- text alignment: 1
  387. -- font id: 0
  388. -- text size: 12
  389. -- style flags: 0
  390. -- line height: 16
  391. -- part name: Change parameters
  392. ----- HyperTalk script -----
  393. on mouseup
  394.   go card "Config"
  395. end mouseup
  396.  
  397.  
  398.  
  399. -- part 23 (button)
  400. -- low flags: 00
  401. -- high flags: A000
  402. -- rect: left=7 top=294 right=342 bottom=50
  403. -- title width / last selected line: 0
  404. -- icon id / first selected line: 1011 / 1011
  405. -- text alignment: 1
  406. -- font id: 0
  407. -- text size: 12
  408. -- style flags: 0
  409. -- line height: 16
  410. -- part name: Home
  411. ----- HyperTalk script -----
  412. on mouseup
  413.   go home
  414. end mouseup
  415.  
  416.  
  417.  
  418. -- part 24 (button)
  419. -- low flags: 00
  420. -- high flags: A000
  421. -- rect: left=50 top=294 right=342 bottom=117
  422. -- title width / last selected line: 65535
  423. -- icon id / first selected line: -15744 / 49792
  424. -- text alignment: 1
  425. -- font id: 0
  426. -- text size: 12
  427. -- style flags: 0
  428. -- line height: 16
  429. -- part name: Quit HC
  430. ----- HyperTalk script -----
  431. on mouseup
  432.   global CommSpeed,CommPrompt, NodeName, NodeType, Username
  433.   openascii
  434.   if NodeType is "vms" then
  435.     writeascii "set term/vt100/echo/page=24" & return
  436.   else
  437.     writeascii "set term=vt100" & return
  438.     wait 30
  439.     writeascii "stty rows 24" & return
  440.   end if
  441.   displayscreen "dis",CommPrompt
  442.   domenu "quit hypercard"
  443. end mouseup
  444.  
  445.  
  446.  
  447. -- part 25 (field)
  448. -- low flags: 01
  449. -- high flags: 0002
  450. -- rect: left=223 top=327 right=339 bottom=285
  451. -- title width / last selected line: 0
  452. -- icon id / first selected line: 0 / 0
  453. -- text alignment: 1
  454. -- font id: 4
  455. -- text size: 9
  456. -- style flags: 0
  457. -- line height: 12
  458. -- part name: LineCount
  459.  
  460.  
  461. -- part 30 (field)
  462. -- low flags: 01
  463. -- high flags: 0004
  464. -- rect: left=176 top=249 right=342 bottom=221
  465. -- title width / last selected line: 0
  466. -- icon id / first selected line: 0 / 0
  467. -- text alignment: 1
  468. -- font id: 3
  469. -- text size: 9
  470. -- style flags: 0
  471. -- line height: 12
  472. -- part name: Connection
  473.  
  474.  
  475. -- part 32 (button)
  476. -- low flags: 00
  477. -- high flags: A004
  478. -- rect: left=411 top=318 right=342 bottom=495
  479. -- title width / last selected line: 0
  480. -- icon id / first selected line: 0 / 0
  481. -- text alignment: 1
  482. -- font id: 0
  483. -- text size: 12
  484. -- style flags: 0
  485. -- line height: 16
  486. -- part name: Speak Text
  487. ----- HyperTalk script -----
  488. on mouseUp
  489.   ReadField1
  490. end mouseUp
  491.  
  492.  
  493.  
  494. -- part 34 (button)
  495. -- low flags: 00
  496. -- high flags: A000
  497. -- rect: left=454 top=26 right=73 bottom=501
  498. -- title width / last selected line: 0
  499. -- icon id / first selected line: 21060 / 21060
  500. -- text alignment: 1
  501. -- font id: 0
  502. -- text size: 12
  503. -- style flags: 0
  504. -- line height: 16
  505. -- part name: Help
  506. ----- HyperTalk script -----
  507. on mouseup
  508.   go card "Ohjeita"
  509. end mouseup
  510.  
  511.  
  512.  
  513. -- part 36 (button)
  514. -- low flags: 00
  515. -- high flags: A000
  516. -- rect: left=454 top=72 right=119 bottom=501
  517. -- title width / last selected line: 65535
  518. -- icon id / first selected line: -15743 / 49793
  519. -- text alignment: 1
  520. -- font id: 0
  521. -- text size: 12
  522. -- style flags: 0
  523. -- line height: 16
  524. -- part name: PANIC
  525. ----- HyperTalk script -----
  526. on mouseup
  527.   PANIC
  528. end mouseup
  529.  
  530.  
  531.  
  532. -- part 37 (field)
  533. -- low flags: 80
  534. -- high flags: 2004
  535. -- rect: left=28 top=22 right=289 bottom=479
  536. -- title width / last selected line: 0
  537. -- icon id / first selected line: 0 / 0
  538. -- text alignment: 1
  539. -- font id: 0
  540. -- text size: 12
  541. -- style flags: 16384
  542. -- line height: 16
  543. -- part name: Anna PWD
  544.  
  545.  
  546. -- part 38 (field)
  547. -- low flags: 80
  548. -- high flags: 2004
  549. -- rect: left=154 top=156 right=179 bottom=324
  550. -- title width / last selected line: 0
  551. -- icon id / first selected line: 0 / 0
  552. -- text alignment: 0
  553. -- font id: 0
  554. -- text size: 12
  555. -- style flags: 256
  556. -- line height: 16
  557. -- part name: PWD
  558.  
  559.  
  560. -- part contents for card part 22
  561. ----- text -----
  562. **** PAINA NAPPULAA "AVAA YHTEYS" ****
  563.  
  564. -- part contents for card part 25
  565. ----- text -----
  566. Lines 7
  567.  
  568. -- part contents for card part 37
  569. ----- text -----
  570.  
  571.  
  572.  
  573. Kirjoita  salasanasi. 
  574. (Input your password here)
  575.  
  576. (Se kirjoittuu ΓÇó-merkkein├ñ alla olevaan kentt├ñ├ñn)
  577. (You will see it as ΓÇó characters)
  578.  
  579. -- part contents for card part 38
  580. ----- text -----
  581. ΓÇóΓÇóΓÇóΓÇóΓÇóΓÇóΓÇóΓÇóΓÇóΓÇóΓÇóΓÇóΓÇó
  582.  
  583. -- part contents for card part 30
  584. ----- text -----
  585. kallio tukki unix